// Copyright 2021 Guoyoko. All Rights Reserved.

#include "Style/SWCoreStyleSet.h"


#define IMAGE_BRUSH(RelativePath, ...) FSlateImageBrush(ContentRootDir / RelativePath + TEXT(".png"), __VA_ARGS__)
#define BOX_BRUSH( RelativePath, ... ) FSlateBoxBrush( RootToContentDir( RelativePath, TEXT(".png") ), __VA_ARGS__ )

const FVector2D Icon16x16(16.f, 16.0f);
const FVector2D Icon32x32(32.f, 32.0f);
const FVector2D Icon40x40(40.f, 40.0f);
const FVector2D Icon56x56(56.0f, 56.0f);
const FVector2D Icon64x64(64.0f, 64.0f);


FWCoreStyleSet::FWCoreStyleSet()
	: FSlateStyleSet("SplitWindowsCoreStyle")
{

}

void FWCoreStyleSet::Initialize()
{
	SetContentRoot(FPaths::ProjectPluginsDir() / TEXT("SplitWindows/Content/Slate"));

	Set("DetailsView.CollapsedCategory", new BOX_BRUSH("Common/GroupBorder", FMargin(4.0f / 16.0f), FLinearColor(0.5f, 0.5f, 0.5f, 0.5f)));
	Set("DetailsView.CollapsedCategory_Hovered", new BOX_BRUSH("Common/GroupBorder", FMargin(4.0f / 16.0f), FLinearColor(0.5f, 0.5f, 0.5f, 1.0f)));

	Set("DetailsView.Item", new BOX_BRUSH("Common/GroupBorder", FMargin(4.0f / 16.0f), FLinearColor(0.5f, 0.5f, 0.5f, 0.2f)));
	Set("DetailsView.Item_Hovered", new BOX_BRUSH("Common/GroupBorder", FMargin(4.0f / 16.0f), FLinearColor(0.8f, 0.8f, 0.8f, 0.2f)));

	Set("Placement.Cube", new IMAGE_BRUSH("Icons/Cube_64x", Icon56x56));
	Set("Placement.Cube.Small", new IMAGE_BRUSH("Icons/Cube_16x", Icon16x16));	
	Set("Placement.Sphere", new IMAGE_BRUSH("Icons/Sphere_64x", Icon56x56));
	Set("Placement.Sphere.Small", new IMAGE_BRUSH("Icons/Sphere_16x", Icon16x16));

	
	Set("HighresScreenshot.Capture", new IMAGE_BRUSH("Icons/icon_HighResScreenshotCapture_24px", Icon40x40));
}

